import { serviceCreate } from '../utils/request'
import { merge } from 'axios/lib/utils'
const http = serviceCreate({
  // baseURL: '/dv',
  // 表单提交
  emulateJSON: true
})
// @config {headers, emulateJSON, loading, msg, errMsg, disableInterceptor}
const methods = {
    // 获取抽奖信息
    getDetail (params, config) {
        params = merge({
            // 抽奖动态id
            dynamic_id: ''
        }, params || {})
        return http.get('/lottery/getDetail', merge(config, { params }))
    },
    // 获取奖品信息
    getPrize (params, config) {
        params = merge({
            // 抽奖动态id
            business_id: '',
            business_type: 4
        }, params || {})
        return http.get('/lottery/getPrize', merge(config, { params }))
    }
}

export default methods
